package com.cos.hospital.ui.record.bean;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.cos.hospital.model.bean.ImageBean;
import com.cos.hospital.model.bean.RecordWebBean;
import com.cos.hospital.ui.record.RecordCode;

import java.util.List;

/**
 * @Description: 所有编辑病历模块它爹
 * @Author: Kosmos
 * @Date: 2018年09月18日 21:00
 * @Email: KosmoSakura@foxmail.com
 */
public class BeanRecord implements MultiItemEntity {
    private int id;//病历 元素ID
    private String fldElementName;//元素名
    private String fldElementValue;//元素内容
    private int fldEleID;//信息 元素ID:模块唯一标志
    private List<ImageBean> imageBeanList;
    private int sortID;//排序id
    private RecordWebBean.MhfBean mhfBean;//月经史公式
    private RecordWebBean.RhfBean rhfBean;//生育史公式
    private String fldTreatmentDesc;


    /**
     * @param fldEleID 模块唯一标志
     */
    public BeanRecord(int fldEleID) {
        this(0, fldEleID, RecordCode.getSortID(fldEleID), "", null, null);
    }

    public BeanRecord(int id, int fldEleID, int sortId, String fldElementValue) {
        this(id, fldEleID, sortId, fldElementValue, null, null);
    }

    public BeanRecord(int id, int fldEleID, int sortId, String fldElementValue,String fldTreatmentDesc) {
        this(id, fldEleID, sortId, fldElementValue, null, fldTreatmentDesc);
    }

    /**
     * @param id              //病历 元素ID
     * @param fldEleID        //信息 元素ID 模块唯一标志
     * @param fldElementValue //元素内容
     */
    public BeanRecord(int id, int fldEleID, int sortId, String fldElementValue, List<ImageBean> imageBeanList, String fldTreatmentDesc) {
        this.id = id;
        this.fldEleID = fldEleID;
        this.sortID = sortId;
        this.fldElementValue = fldElementValue;
        this.imageBeanList = imageBeanList;
        this.fldTreatmentDesc = fldTreatmentDesc;
        switch (fldEleID) {
            case RecordCode.Type.ChiefDescribe://主诉:
                fldElementName = "主诉";
                break;
            case RecordCode.Type.CurrentMedicalHistory://现病史:
                fldElementName = "现病史";
                break;
            case RecordCode.Type.PastHistory://既往史:
                fldElementName = "既往史";
                break;
            case RecordCode.Type.AllergyHistory://过敏史:
                fldElementName = "过敏史";
                break;
            case RecordCode.Type.MenstruationHistory://经产史:
                fldElementName = "经产史";
                break;
            case RecordCode.Type.TonguePulse://舌脉象:
                fldElementName = "舌脉象";
                break;
            case RecordCode.Type.Diagnosis://辩证诊断:
                fldElementName = "辩证诊断";
                break;
            case RecordCode.Type.Prescription://治疗处方:
                fldElementName = "治疗处方";
                break;
            case RecordCode.Type.AcupunctureRecord://针灸记录:
                fldElementName = "针灸记录";
                break;
        }
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getSortID() {
        return sortID;
    }

    public void setSortID(int sortID) {
        this.sortID = sortID;
    }

    public String getFldElementName() {
        return fldElementName;
    }

    public void setFldElementName(String fldElementName) {
        this.fldElementName = fldElementName;
    }

    public String getFldElementValue() {
        return fldElementValue;
    }

    public void setFldElementValue(String fldElementValue) {
        this.fldElementValue = fldElementValue;
    }

    public int getFldEleID() {
        return fldEleID;
    }

    public void setFldEleID(int fldEleID) {
        this.fldEleID = fldEleID;
    }

    public List<ImageBean> getImageBeanList() {
        return imageBeanList;
    }

    public void setImageBeanList(List<ImageBean> imageBeanList) {
        this.imageBeanList = imageBeanList;
    }

    public RecordWebBean.MhfBean getMhfBean() {
        return mhfBean;
    }

    public void setMhfBean(RecordWebBean.MhfBean mhfBean) {
        this.mhfBean = mhfBean;
    }

    public RecordWebBean.RhfBean getRhfBean() {
        return rhfBean;
    }

    public void setRhfBean(RecordWebBean.RhfBean rhfBean) {
        this.rhfBean = rhfBean;
    }

    @Override
    public int getItemType() {
        return fldEleID;
    }

    public String getFldTreatmentDesc() {
        return fldTreatmentDesc;
    }

    public void setFldTreatmentDesc(String fldTreatmentDesc) {
        this.fldTreatmentDesc = fldTreatmentDesc;
    }
}
